home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d11
/
ega2vga3.arc
/
EGA2VGA3.DOC
< prev
next >
Wrap
Text File
|
1989-01-12
|
31KB
|
727 lines
EGA2VGA Copr. (c) 1988-89 Lawrence Gozum & Marvin Gozum
───────────────────────────────────────────────────────
User Manual
DISCLAIMER
This product is distributed AS IS. The authors specifically disclaim
all warranties ,expressed or implied, including ,but not limited to,
implied warranties of merchantability and fitness for a particular
purpose with respect to defects in the diskette and documentation, and
program license granted herein, in particular, and without limiting
operation of the program license with respect to any particular
application use or purpose. In no event shall the authors be liable
for any loss of profit or any other commercial damage including but
not limited to special,incidental, consequential or other damages.
LICENSING AGREEMENT
You may use this program on a TRIAL BASIS only; this means that you
may freely evaluate this program for a period not to exceed TEN (10)
DAYS. Should you find this program useful, you must register it (see
last section of this manual).
You may freely distribute copies of this program in its UNMODIFIED
state provided you do not include it in other software packages, with
the exception of distributing it as part of a bundle of Public Domain
or Shareware programs on a single diskette. In addition you may not
charge more that $3.50 for copying and/or distributing this program in
the absence of any recognized Users Group guidelines.
WHAT IS EGA2VGA ?
EGA2VGA is a conversion program that will convert ANY GIF (16 colors
and below) and ANY VIEWABLE EGA 640x350x16 (or 2) or VGA 640x480x16
(or 2) picture into a 320x200x256 color picture, WITH 256 NEW COLORS !
EGA2VGA actually generates 256 new colors from the original 16 color
EGA palette and interprets color mixtures. EGA2VGA also accurately
calculates the correct aspect ratio for translation. Finally, EGA2VGA
saves your converted screen and palette in a 'bloadable' format for
porting to:
(1) VGACAD for editing/image processing;
(2) BLD2GIF for reconversion to a smaller 320x200x256 GIF pic;
(3) GIFDOT for printing to an Epson/IBM compatible printer;
(4) GIFPUB for desktop publishing.
EGA2VGA comes with TWO (3) TSR (Terminate and Stay Resident) utilities
called EGADMP (EGA DuMP), VGADMP (VGA DuMP) and XGADMP (eXtended EGA
DuMP) which capture the raw screen data of any EGA 640x350x16 or
VGA/EEGA 640x480x16 in files EGA350SC.nnn/EGAPAL16.nnn (for EGADMP),
VGA480SC.nnn/VGAPAL16.nnn (for VGADMP), and XGA480SC.nnn/XGAPAL16.nnn,
(for XGADMP).
REQUIREMENTS
No Video card is required. About 512KB of free memory is required;
although, EGA2VGA actually uses about half of it. GIF files can be
converted even if you are using CGA, Hercules or EGA cards.
You MUST have VGA (at least BIOS compatible) present and an analog
monitor to use VGADMP. PS/2 Model 30's that support MCGA only cannot
use VGADMP. VGADMP needs 307,984 of diskspce per picture. A HardDisk
is highly recommended.
EGADMP requires an EGA card (256KB version). EGADMP need 224,016 of
diskspace for each captured picture. XGADMP requires an Extended EGA
card (e.g., ATI EGA Wonder 800, Quadram Prosync EGA, Video7 Vega
Deluxe EGA, BOCA EGA, Paradise EGA 480, STB Auto EGA, etc ...) or a
VGA compatible card.
EGA2VGA needs 64KB of diskspace to save each processed picture. GIF
files vary in their disk space requirements. For example, a
640x480x16 GIF picture will decompose to 307,200 bytes, while a an
EEGA 800x560x16 (e.g., ATI EGA Wonder) will decompose to 448,000
bytes. The program will abort creation of decomposed GIF files if
there is insufficient diskpace.
Note: When in DOS or using a picture viewer (e.g., PICEM, EGAGIF,
FASTGIF, VPIC, CSHOW, OPTIKS) or application which requires
a keypress to continue, it is necessary to hit any key or a
specified key (e.g., <Spacebar> or <Return> or <Esc>) after
hitting the 'HOTKEY' before EGADMP or VGADMP or XGADMP saves
the screen and palette.
HOW TO USE EGADMP, XGADMP and VGADMP
Simply run EGADMP, XGADMP and/or VGADMP before entering your
painting/CAD or digitized picture viewer. After loading, press
<ALT-F10> for EGADMP or <ALT-F9> for VGADMP, while viewing your
picture. Your current screen and palette will be saved in your
default drive and directory.
In the case of EGADMP, the first time you run the program it will save
your screen and palette to EGA350SC.000 and EGAPAL16.000
respectively. If there is an existing EGA350SC.nnn or EGAPAL16.nnn,
then it will increment to the next higher number. This can be
confusing if you keep unmatched screens and palettes. You can use
your favorite memory managers to remove this TSR or reboot to release
it from memory. VGADMP will saves to VGA480SC.nnn and VGAPAL16.nnn
files, while XGADMP saves to XGA480SC.nnn and XGAPAL16.nnn files.
Some GIF viewers view 640x480x16 pictures in Extended EGA 640x480x16
mode. VGADMP WILL NOT SAVE THE PALETTE DATA CORRECTLY WITH THESE
VIEWERS; USE XGADMP INSTEAD. VGADMP uses the DAC registers which only
come with VGA cards in Mode 12 (640x480x16 - 16 colors from 256KB).
Extended EGA (EEGA) is NOT VGA ! EEGA uses only 16 colors from a 64
fixed colors possibilities. If your picture doesn't look right in VGA
mode then it was probably viewed in EEGA mode.
Dual Floppy users (5.25 inch types) have a problem. Since the raw
pixel dumps per file are quite large, you have save the "dumped" pixel
files in another drive. For example:
With EGADMP resident in memory, TESTPIC.GIF in Drive A: and
viewing program (e.g., FASTGIF) in Drive A: you must switch the
default drive and view the picture from the other drive.
1) Type "B:"<ret> to switch to Drive B: as default.
2) From Drive B: type "A:FASTGIF A:testpic.gif" <ret>.
3) Now when you hit <ALT-F10> the pixels and palette will be
"dumped" in Drive B:.
HOW TO USE EGA2VGA
EGA2VGA follows a 3 step process (4 with VGA/MCGA card).
STEP 1: Specify Input and Output files.
a. Select from [E]GA 640x350x16 (captured)
[X]EGA 640x480x16 (captured)
[V]GA 640x480x16 (captured)
[G]IF NNNxNNNxNN (16 or less colors)
b. Press the <Spacebar> to specify the PATH (where the "dumped"
files are located; Hard Disk users can use the same
directory (assuming you have enough free disk space).
Pathnames MUST end with the backslash character (i.e.,"\")
or it will be rejected.
Examples: "A:\" or "B:\" or "C:\GIF\EGA\"
c. Select the specific file by moving the <arrow> keys over the
filename then press <return> to select that file.
If a GIF file was processed previously, a TEMP.RAW file
would have been created which are the decompressed pixels;
this file is NOT automatically deleted after processing a
LARGE GIF picture. If you want to process the same picture
using a different method (e.g., "color averaging") or want
to zoom another part of the same picture, simply reply [Y]es
when prompted "Use TEMP.RAW ? [Y/n]".
The palette data and screen size dimensions are NOT retained
and MUST be read (i.e., again) from the original GIF picture
processed. Be sure to remember what that GIF file was (if
you intend to reuse the TEMP.RAW file) or you will have
mismatched colors and screen dimensions. This feature saves
a lot of time since decompressing the pixels to disk is a
time consuming process. use this feature if you want to
"zoom" another area of the picture or continue experimenting
with color generation at anothwer time.
Floppy disk and High-density drive users SHOULD delete
TEMP.RAW if you are not going to process the same picture
again; you may get an error message for insufficient disk
space if you don't.
d. Specify the FILENAME that will be given to the converted
picture. If there is an existing file with the same
filename(s) then an error beep will follow and your input
will be rejected. DO NOT INCLUDE EXTENSION. The program
will automatically append the extension to your files.
Converted files will be saved to your DEFAULT drive and
directory if you do not specify a PATH. The following are
legal pathnames:
Examples: "A:\MYPIC"
"C:\VGACAD\MYPIC"
STEP 2: Modify the 16 color palette (VGA required/optional)
VGA users will have this function if a VGA card is detected;
otherwise, the program will skip this step.
EGA provides only 16 colors from 64 hardware-generated colors;
these are fixed and cannot be modified. VGA/MCGA 320x200x256
mode (Mode 13) allows 256 color from 262,144 possible colors; in
VGA 640x480x16 color mode, you are allowed 16 colors from the
262,144 color selection.
Your captured picture will be displayed in 640x480x16 color mode
and will look exactly like your original EGA picture but slightly
flattened if the screen size is less than 480. If the Screen
Width is greater than 640 pixels, the excess pixels will be
truncated (e.g., 800x600x16 GIF picture). Don't worry about the
aspect ratio, the main fuunction of this step is to modify the 16
color palette; the program will adjust the aspect ratios
automatically in succeeeding steps.
Why modify the 16 color palette ? EGA's 64 color selection is
quite limited; as a result you will notice that skin tones are
forced to shades of orange, pink, yellow and red. With VGA's
640x480x16 mode you can adjust each of the 16 colors to more
closely resemble photographic quality. Some pictures in VGA
640x480x16 format use the same 64 color selection of EGA as well.
When your picture will be in full view and a color line will
appear asterisks ("*****") representing each of the assigned 16
colors. You can stop the display at any time by pressing
<Esc>. You can adjust each of the 16 colors by using the
following keyboard commands.:
a. [SpaceBar] - will cycle through each of the 16 colors and
highlight the current selected color with a "██████"
highlight block.
b. [R], [G] or [B] - will select the color component of your
current color to be modified; an arrow will appear beside
the RGB (Red Green Blue) value of your current color.
c. [+] will increase the value of your selected color component
(R, G or B) within the range of 0 to 63). As you modify any
component you will see the change in your picture and in the
highlight block.
d. [-] will decrease the value of your selected color component
within the range 0 to 63.
e. [U]ndo will restore the RGB values of the current selected
color as long as you do not move on to another color to be
modified.
f. [Esc] will exit palette modification and set your 16 color
palette.
STEP 3: Select Matrix Type and Color Match Cutoff
THIS IS THE MOST IMPORTANT PART OF EGA2VGA CONVERSION !.
Primarily, you are using this utility to convert color-dithered
pictures. These dithers may be ordered or error-distributed
(i.e., "random"). If dithering is ordered (i.e., 2x2 matrices or
3x3 matrices) then selecting a 2x2 matrix or 3x3 matrix type will
make a tremendous difference in color generation and avoidance of
striated patterns. Generally, the 2x2 Matrix type performs
adequately, you can opt for the 3x3 Matrix type for richer color
generation. Non-VGA/MCGA users should use the 2x2 matrix type
By pressing return as a response to each input prompt for a
matrix type and color match cutoff, the default values will be
entered instead of your specification.
DEFAULT VALUES
Color Match Cutoff: 40
Matrix Type : 2x2 (A)
Color Match Cutoff or Cutoff (for short) determines how closely
matched colors must be to be generated. If an existing color in
your palette is "close" enough to the required color, then it
will be used; otherwise a new one is generated.
VGA/MCGA users can press <Esc> at any time while the picture is
being generated to view the total number of new colors generated.
You can then ABORT the processing and choose a new Matrix Type
and/or Cutoff. All other video cards will show a status line
showing the Matrix Type, Cutoff, Colors generated and Lines to
Go; pressing <Esc> returns you to this step.
While the picture is being generated, monitor the number of
colors being generated. If the processing slows down at the
start of a few lines then your Cutoff is too low; your picture is
too rich and new colors are being generated to fit the Cutoff you
specified. <Esc> to this step (i.e., abort processing) and
reselect a HIGHER Cutoff. If you notice that the colors being
generated are too few then decrease the Cutoff to make the
program find/create more accurate colors.
This is your main experimental loop; your mission is to find the
ideal Cutoff value and generate as many colors (255 maximum)
without running out of colors. The picture is generated in an
interlaced fashion which ensures that colors are sampled and
generated from all over the screen.
VGA/MCGA users: Monitor the quality of the picture and speed of
processing; this will give you an indication of the colors being
generated. Press <Esc> as many time as you want to interrupt the
processing to monitor the actual number of colors generated and
go back to this step to find the optimal Cutoff.
All other users, watch the Colors generated on the status line;
if you generate over 100 colors after the first 3-5 lines then
your Cutoff is too low and needs to be increased.
If you run out of colors too soon then other colors in your
picture will have to settle for the closest match in the existing
palette. If you can generate 180-240 colors then an optimal
compromise has been met. Future versions will include more
elaborate algorithms and schemes.
PICK 'N ZOOM
If a VGA/MCGA card is detected, then this feature will be activated. A
"capture box" will appear and can be moved with <ARROW> keys (use the
<Shift-ARROW> keys to move around the screen faster.
Pressing the <+> key increases the size of your "capture box" (the
area to be zoomed) - resulting in a smaller "zooming factor", but
including a larger area of the picture. Conversely, pressing the <->
key will decrease the "capture box", resulting in larger magnification
but procesing a smaller area of the total picture.
After viewing the "zoomed picture", press <return> to save the image
or press <Esc> to reselect and redefine the "zoomed image". The image
will be saved to "ZOOM.BLD" and "ZOOM.PLT"; these files will be
constantly overwritten; thus, you MUST rename these files later.
The "Pick 'N Zoom" loop is similar to the full screen conversion loop
and follows the same steps with the additional step of selecting a
"captured area" to be zoomed.
FULL SCREEN CONVERSION FLOWCHART
╔═══════════════════════════════╗
║ STEP 1: Input/Output Files ║
╚══════════════╤════════════════╝
┌─────────────────┼──────────────────────┐
│ │ │
│ ├─Display Picture <────┼────┐
│ │ (VGA required) │ │
│ ┌──────────────┴─────────────────┐ │ │ F
│ │ STEP 2: Palette Modification │ │ │ U
│ └──────────────┬─────────────────┘ │ │ L
│ │ <Esc> │ │ L M
└─────────────────┼──────────────────────┘ │ O
│<──────────────────────────┤ S D
│ │ C E
┌──────────────┴─────────────────┐ │ R
│ STEP 3: Cutoff/Matrix Type │ │ E
└──────────────┬─────────────────┘ │ E
│ <Esc> │ N
┌──────────────┴─────────────────┐ │
│ STEP 4: Conversion ├─────────┘
└──────────────┬─────────────────┘ <Esc>
│
╔══════════════╧════════════════╗
║ Save & Exit ║ Non-VGA/MCGA users
╚══════════════╤════════════════╝ stop here
|
| VGA/MCGA user optional
| "Pick 'N Zoom" processing
┌─────────────────┼──────────────────────┐
│ │ │
│ ├─Display Picture <────┼────┐
│ │ (VGA required) │ │
│ ┌──────────────┴─────────────────┐ │ │
│ │ STEP a: Palette Modification │ │ │ P
│ └──────────────┬─────────────────┘ │ │ I
│ │ <Esc> │ │ C
└─────────────────┼──────────────────────┘ │ K
│<──────────────────────────┤ M
┌──────────────┴─────────────────┐ │ 'N O
│ STEP b: Cutoff/Matrix Type │ │ D
└──────────────┬─────────────────┘ │ Z E
│ <Esc> │ O
┌──────────────┴─────────────────┐ │ O
│ STEP c: Pick 'N Zoom ├─────────┤ M
└──────────────┬─────────────────┘ │
│ <Esc> │
┌──────────────┴─────────────────┐ │
│ STEP d: Conversion ├─────────┘
└──────────────┬─────────────────┘ <Esc>
│
╔══════════════╧═════════════════╗
║ Save & Exit ║
╚════════════════════════════════╝
BLOADING CONVERTED PICTURES IN BASIC
The following lines will load one of the captured screens from
QuickBASIC 4.0; if you are using QuickBASIC 1.0, 2.0 or 3.0, I have
included VGAMODE.obj which you can include in your UserLib.exe through
BUILDLIB.exe.
VGAMODE is a BIOS compatible assembly routine which can call the more
exotic graphic modes of your compatible VGA card (e.g. 800x560x16
color mode of ATI's VGA VIP and EGA Wonder); check your user manual
for the correct hex codes.
USAGE: Call VGAMODE(&H13) : 'MCGA 256 color mode
or Call VGAMODE(mode%): 'where mode is an integer that
'corresponds to the videomode
'after translating it from HEX
The following lines will perform just as well.
Call VGAMODE(&H13): 'init MCGA 256 color mode
DEF SEG=&HA000: 'point data segment to
'screen buffer A0000H
Bload "MYPIC.BLD",0: 'load the screen
WRITEPAL is also a BIOS compatible assembly routine that writes to 256
palette registers. Although its main purpose is to facilitate the
overriding of the VGA or MCGA standard palette, since it is an
all-purpose BIOS routine it will facilitate changing the palettes of
more exotic screen modes such as the 640x480x256 color screens of
IBM's 8514/A adaptor. This function is similar to "PALETTE USING" in
QuickBASIC with the major advantage of following the BIOS convention
which VGACAP captures and "bsaves" with.
USAGE: Call WritePal (Dseg%,Offset%)
WHERE: Dseg% =result of VARSEG for array storage
Offset%=result of VARPTR for array storage
The following lines illustrate its use.
DIM UserPal%(769) :' 256 colors x 3 registers=768
:' registers= red grn blu
Dseg%=VARSEG(UserPal(1)) :' get data segment
Offset%=VARPTR(UserPal(1)) :' get offset
DEF SEG=Dseg% :' override data segment
BLOAD "MYPIC.PLT",Offset% :' bload in correct offset
Call WritePal (Dseg%,Offset%)
Palettes converted with EGA2VGA follow the BIOS calling for contiguous
RGB (red green blue) values for all 256 colors. One BIOS call can
update an entire palette with RGB values stored in this manner.
USING VGABLD
The "bloadable" format has several advantages. You will notice that
the pictures load INSTANTANEOUSLY ! Bloading a screen is simply a
memory dump into your display area - crucial for presentations.
In addition, keeping the screen and palette separate allows you to use
one palette for several pictures or for creating special effects or
animation. For example, you can make a picture shift from a "day
scene" to a "night scene" by simply changing the palette.
You need not go through the tedium of writing your own program just to
view your captured pictures. VGABLD will load a picture for viewing.
Captured screen and palette MUST have the .BLD and .PLT extensions
respectively for the same picture. The BASIC source code is included
and is ready for compilation.
If you want to convert you screen and palette to CompuServe's GIF
(Graphics Interchange Format); download a copy of BLD2GIF from your
local BBS (if it has managed to reach your city) or register and
request to receive it as part of your registered package and use it to
convert the two files into GIF format or simply use VGACAD (v1.5 and
up) since it supports saving and loading 320x200x256 GIFs.
REGISTRATION
BONUS: Registered users of VGACAD v1.4-1.5, VGA2EGA v1.0,
SQZGIF v1.0-v1.2, GIFPUB v1.0-1.2, MAC2GIF v1-2 and/or
GIFDOT v1.0-v1.2 are registered for EGA2VGA. Copy your
REGISTER.OVL file into the directory of EGA2VGA and it
will operate as a registered version. IF YOU HAVE NOT
REGISTERED ANY OF THESE PROGRAMS, DO SO NOW; WHEN VGACAD
v1.60 IS RELEASED, THE REGISTER.OVL FILE WILL CHANGE AND
ALL NEW RELEASES WILL REQUIRE REGISTER.V16 TO OPERATE AS
A NON-SHAREWARE VERSION.
For 19.95 (for orders outside of U.S.A. add USD $15.00) you will be
entitled to the latest update of EGA2VGA and REGISTER.V16 file (when
released). The following programs listed below are provided (latest
copy or update) to registered users. As much as possible, we are
reprogramming all utilities to work with ANY video card; programs
that, at present, work with ANY video card are: GIFPUB, GIFPUB,
EGA2VGA (v2.0), MAC2GIF and SQZGIF. We intend to modify all utilities
to have device-independent graphics capabilities (with the obvious
exception of VGACAD, VGACAP, VGA2EGA, and CGA2VGA). If you are a
Hercules, CGA or EGA user, and you upgrade to VGA, please inform us as
soon as possible so that we may send you VGA-dependent releases too.
NEW! 3.5" disk users: We are now supporting this format.
If you want your updates in this format, add $10.
* Device-independent utilities
GIFPUB - converts 256 color GIFs to B&W images of varying sizes
for desktop publishing/printing as .PCX (ZSoft format for Ventura
Desk Top Publisher, First Publisher, Publisher's Paintbrush, PC
Paintbrush+) or rename files to .PCC for importing in Aldus
Pagemaker.
GIFDOT - converts 256 color GIFs to B&W images of varying sizes
for printing on IBM and Epson compatible printers (separate
drivers). Several print sizes with perfect aspect ratios.
Variable Brightness and Contrast Stretching. Single or Double
pass printing. Histogram Analysis.
SQZGIF - converts LARGE GIF pictures (up to 2048x2048x256) to
320x200x256 using interpolation and "color averaging" techniques
to blend/smooth "jaggies" inherent in reducing LARGE GIFS while
retaining a maximum of color information. Version 1.2 is now
300% FASTER and features the same user interface.
MAC2GIF - converts .MAC ("readmac") pictures to 5-16 grey shades
or color and saves results as .GIF or BLD/PLT file, and other
formats; graphics are viewable in VGA, MCGA or EGA - no video
card is required for direct Black & White conversion to GIF.
* Device-dependent utilities/applications
VGA2EGA - conversion utility to convert 256 color pictures to EGA
or Extended EGA picture with "35" grey shades or any combination
of 42,875 COLORS for the BEST possible rendition of 256 color
pictures on an EGA/Extended EGA system.
VGACAD - extensive paint/image processing program for VGA/MCGA
users; v1.50 features extensive paintingcapabilities, an
integrated GIF interface, Airbrushes, color and grey image
processing functions (smoothing, noise removal, shading, contrast
stertching, edge detection, high frequency-boosting, ... more),
Bezier/spline curves, multi-featured Cut&Paste, variable sizing,
multi-directiona 256-color gradient fills, 256 color 16x16
pattern fills, and a LOT of other 256-color capabilities.
Whats next ?
SYNPCX is utility to convert dithered, monochrome .PCX (Zsoft) files
to smooth grey shades.This utility is primarily designed to convert
scanned Black & White images, saved to a .PCX file, for use image
processing with VGACAD, redithering/resizing with GIFPUB, printing
with GIFDOT, or EGA conversion with VGA2EGA. SYNPCX will be graphics
device independent (No Video Required).
VGA2EGA is being "turbo-charged" in speed and will feature
Floyd-Steinberg error-distributed dithering of EGA colors for a
standardized 16-color picture resulting in excellent detail retention
and, virtually, standardized viewing on any EGA/EEGA system, with the
greatest possible number of colors "viewable".
On the longer term, you can expect radical changes in VGACAD. We are
also, developing VGASHW (a 256-color presentation system), VGACBT (the
PROGRAMMABLE Computer-Based Training counterpart of VGASHW) AND
MANNEQUIN (what "Weird Science" tried to do in the movie it will do on
the computer screen with potential applications for Advertising and
Fashion Design, aside from creating your own artistic nudes).
If you support maverick authors like us, we will continue to develop
innovative products like nothing seen commercially - otherwise they
will, as many (sigh!) good Shareware programs, simply "DIE" from lack
of support ! Compare the cost/benefit ratio of any of our products
with commercial products; we want to continue supporting and
developing these products. Please support the User-Supported
(Shareware) concept; you, and you alone, determine whether it will be
worthwhile to continue developing.
To register, send in the registration form and check payable to
Dr. Marvin Gozum
2 Independence Place Apt. 303-2
6th & Locust Street
Philadelphia, PA 19106
───────────────────────────────────────────────────────
Graphics Interchange Format and GIF are trademarks (tm)
of CompuServe Inc. an H&R Block Company.